<?php
//tgtinfo_volume.php
//
//Show a volume report for a token on the get request
//
include ('wp-load.php');

if (isset($_GET['token'])) {
    $token = trim(sanitize_text_field($_GET['token']));
    if (preg_match('{^[a-f0-9]+$}',$token) != 1) {
        echo "INVALID TOKEN";
        exit();
    }
        
    $sql = "Select user_id FROM wp_cs_validate Where token = '$token'";
    
    $userid = $wpdb->get_var($sql);
    
    if (empty($userid)) {
        echo "INVALID CALL";
        exit();
    }
    ?>
<style type="text/css">table { margin-bottom: 1.2em; width: 80%; text-align: right;} </style>
    <?php
    echo "<strong>Please Update to the Newest Version of MyCurator -- Versions before 1.2.0 will not work with WordPress 3.5!</strong>";
    exit();
}

?>